<style type="text/css">
		.bg-color-dred{ background: #FFE8E8!important;}
		.bg-color-ddred{ background: #FFE8E8!important;}
		.bg-color-dyellow{ background: #FFFFDD!important;}
	</style>
<section id="widget-grid" class="">
	<!-- row -->
	<div class="row">
		<!-- NEW WIDGET START -->
		<article class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
			<!-- Widget ID (each widget will need unique ID)-->
			<div class="jarviswidget jarviswidget-color-blueLight" id="wid-id-0" data-widget-sortable="true" data-widget-colorbutton="false" data-widget-editbutton="false" data-widget-togglebutton="false" data-widget-deletebutton="false">
				<header>
					<span class="widget-icon"> <i class="fa fa-table"></i> </span>
					<h2> 发车计划监控</h2>
				</header>
				<!-- widget div-->
				<div>
					<!-- widget edit box -->
					<div class="jarviswidget-editbox">
						<!-- This area used as dropdown edit box -->
					</div>
					<!-- end widget edit box -->

					<!-- widget content -->
					<div class="widget-body no-padding">
						<!-- 自定义搜索区 -->
						<div class="widget-body-toolbar" style="height:70px;overflow:hidden;">
							<form role="form" class="smart-form">
								<div class="global-search-box">
									
									
									<section class="pull-left no-padding pull-width140" >
										<label class="">发车计划日期</label>
										<label class="input">
											<i class="icon-prepend fa fa-calendar"></i>
											<input name="in_date" class="input-sm" type="text" id="syxDate" value="2014-02-01" maxlength="10">
										</label>
										<script type="text/javascript">	
											$(document).ready(function() {
											  $('#syxDate').daterangepicker({ 
													singleDatePicker: true, //必须要有默input 认value
													//timePicker: true,		//是否启用时间选择
													timePickerIncrement:10,	//分钟选择的间隔
													format: 'YYYY-MM-DD',	//返回值的格式
													//timePicker12Hour: false,	//采用24小时计时制
													showDropdowns: true,		//是否显示年、月下拉框
													});
										   });
										</script>
									</section>
									<section class="pull-left no-padding pull-width200" >
										<label class="">所属机构</label>
										<label class="input">
											<input type="text" class="input-sm" style="width:100%"  name="tid" placeholder="aaa" value=""  id="e5">
											<!-- <select id="e5" style="width:100%" class="input-sm select2"></select> -->
										</label>
									</section>
									
									<section class="pull-left no-padding pull-width180" >
										<label class="">班线名称</label>
										<label class="input">
											<input type="text" name="tid" placeholder="" class="input-sm">
										</label>
									</section>
									<section class="pull-left no-padding pull-width120" >
										<label class="">车牌号</label>
										<label class="input">
											<input type="text" name="tid" placeholder="" class="input-sm">
										</label>
									</section>
									<section class="pull-left no-padding pull-width80" >
										<label class="lael">阶段</label>
										<label class="input">
										<label class="select">
											<select class="input-sm">
												<option value="0">全部</option>
												<option value="0">待发车</option>
												<option value="1">在途</option>
												<option value="0">已结束</option>
											</select> <i></i> 
										</label>
									</section>
									<section class="pull-left no-padding pull-width120" >
										<label class="">起点站</label>
										<label class="input">
											<input type="text" name="tid" placeholder="" class="input-sm">
										</label>
									</section>
									<section class="pull-left no-padding pull-width120" >
										<label class="">终点站</label>
										<label class="input">
											<input type="text" name="tid" placeholder="" class="input-sm">
										</label>
									</section>
									
									<div class="global-search-btn" >
										<a class="btn btn-primary  btn-sm" type="button"><i class="fa fa-search"></i> 查询</a>
										<a id="more_search" class="btn btn-sm btn-link" type="button">更多条件</a>
							  		</div>
								</div>
								
							</form>
						</div>
						<!-- 自定义搜索区结束 -->
						<div class="row margin-top-10 margin-bottom-10" style="margin:0">
							<div class="col-xs-12 col-sm-8">
								<div class="btn-group">
									<a class="btn btn-default" href="#" >回放</a>
									<a class="btn btn-default" href="#" >跟踪</a>
								</div>
							</div>
							<!-- <div class="hidden-xs col-sm-4 text-right">
                            	<div class="btn-group">
									<a type="button" class="btn btn-default " href="#">
                                        <i class="fa fa-bar-chart-o"></i>
                                        相关报表
                                    </a>
                                </div>
							</div> -->
						</div>
						<table id="dt_basic" class="table table-striped table-bordered table-hover">
							<thead>
								<tr>
									
									<th>班线名称</th>
									<th>车牌号</th>
									<th>预计到达时间</th>
									<th>执行阶段</th>
									<th>当前状态</th>
									<th>已行驶进度</th>
									<th>剩余里程</th> 	
									<th>计划运行时长</th>
									<th>实际运行时长</th>
									<th>计划开始时间</th>
									<th>实际开始时间</th>
									<th>计划到达时间</th>
									<th>实际到达时间</th>
									<th>出发站点名称</th>
									<th>途径点信息</th>
									<th>到达站点名称</th>
								</tr>
							</thead>
							<tbody>
                            	<tr>
									
									<td><a href="#" class="jindu">北京市-石家庄-深圳</a></td>
									<td>冀FF4773 </td>
									<td> </td>
									<td><span class="label bg-color-blueLight font-sm">待发车</span></td>
									<td><div class="txt-color-green"><i class="fa fa-fw fa-thumbs-up"></i> 正常</div></td>									
									<td>
										<div class="progress progress-sm no-margin pull-width120">
											<div class="progress-bar bg-color-green" style="line-height:12px" aria-valuetransitiongoal="0">0%</div>
										</div>
									</td>
									<td></td>
									<td>12小时30分</td>
									<td></td>
									<td>2014-07-07 22:30</td>
									<td></td>
									<td>2014-07-08 10:00</td>
									<td></td>
									<td>北京站</td>
									<td></td>
									<td>上海站</td>
								</tr>
								<tr>
									
									<td><a href="#" class="jindu">北京市-石家庄-深圳</a></td>
									<td>冀FF4773 </td>
									<td> </td>
									<td><span class="label bg-color-blueLight font-sm">待发车</span></td>
									<td><div class="txt-color-red"><i class="fa fa-fw fa-warning"></i> 晚发</div></td>
									<td>
										<div class="progress progress-sm no-margin pull-width120">
											<div class="progress-bar bg-color-green" style="line-height:12px" aria-valuetransitiongoal="0">0%</div>
										</div>
									</td>
									<td></td>
									<td>12小时30分</td>
									<td></td>
									<td>2014-07-07 22:30</td>
									<td></td>
									<td>2014-07-08 10:00</td>
									<td></td>
									<td>北京站</td>
									<td></td>
									<td>上海站</td>
								</tr>
								<tr>
									
									<td><a href="#" class="jindu">北京市-石家庄-深圳</a></td>
									<td>冀FF4773 </td>
									<td> </td>
									<td><span class="label bg-color-blueLight font-sm">待发车</span></td>
									<td><div class="txt-color-red"><i class="fa fa-fw fa-warning"></i> 晚发仍未发</div></td>								
									<td>
										<div class="progress progress-sm no-margin pull-width120">
											<div class="progress-bar bg-color-green" style="line-height:12px" aria-valuetransitiongoal="0">0%</div>
										</div>
									</td>
									<td></td>
									<td>12小时30分</td>
									<td></td>
									<td>2014-07-07 22:30</td>
									<td></td>
									<td>2014-07-08 10:00</td>
									<td></td>
									<td>北京站</td>
									<td></td>
									<td>上海站</td>
								</tr>
								<tr>
									
									<td><a href="#" class="jindu">北京市-石家庄-深圳</a></td>
									<td>冀FF4773 </td>
									<td> </td>
									<td><span class="label  bg-color-blue font-sm">在途</span></td>
									<td><div class="txt-color-green"><i class="fa fa-fw fa-thumbs-up"></i> 正常</div></td>
									
									<td>
										<div class="progress progress-sm no-margin pull-width120">
											<div class="progress-bar bg-color-green" style="line-height:12px" aria-valuetransitiongoal="32.9">32.9%</div>
										</div>
									</td>
									<td></td>
									<td>12小时30分</td>
									<td></td>
									<td>2014-07-07 22:30</td>
									<td></td>
									<td>2014-07-08 10:00</td>
									<td></td>
									<td>北京站</td>
									<td></td>
									<td>上海站</td>
								</tr>
								<tr>
									
									<td><a href="#" class="jindu">北京市-石家庄-深圳</a></td>
									<td>冀FF4773 </td>
									<td> </td>
									<td><span class="label  bg-color-blue font-sm">在途</span></td>
									<td><div class="txt-color-red"><i class="fa fa-fw fa-warning"></i> 晚到预警</div></td>
									<td>
										<div class="progress progress-sm no-margin pull-width120">
											<div class="progress-bar bg-color-green" style="line-height:12px" aria-valuetransitiongoal="47">47%</div>
										</div>
									</td>
									<td></td>
									<td>12小时30分</td>
									<td></td>
									<td>2014-07-07 22:30</td>
									<td></td>
									<td>2014-07-08 10:00</td>
									<td></td>
									<td>北京站</td>
									<td></td>
									<td>上海站</td>
								</tr>
								<tr>
									
									<td><a href="#" class="jindu">北京市-石家庄-深圳</a></td>
									<td>冀FF4773 </td>
									<td> </td>
									<td><span class="label  bg-color-blue font-sm">在途</span></td>
									<td><div class="txt-color-red"><i class="fa fa-fw fa-warning"></i> 晚到报警</div></td>
									
									<td>
										<div class="progress progress-sm no-margin pull-width120">
											<div class="progress-bar bg-color-green" style="line-height:12px" aria-valuetransitiongoal="86">86%</div>
										</div>
									</td>
									<td></td>
									<td>12小时30分</td>
									<td></td>
									<td>2014-07-07 22:30</td>
									<td></td>
									<td>2014-07-08 10:00</td>
									<td></td>
									<td>北京站</td>
									<td></td>
									<td>上海站</td>
								</tr>
								<tr>
									
									<td><a href="#" class="jindu">北京市-石家庄-深圳</a></td>
									<td>冀FF4773 </td>
									<td> </td>
									<td><span class="label bg-color-magenta font-sm">已结束</span></td>
									<td><div class="txt-color-green"><i class="fa fa-fw fa-thumbs-up"></i> 准时到达</div></td>
									
									<td>
										<div class="progress progress-sm no-margin pull-width120">
											<div class="progress-bar bg-color-green" style="line-height:12px" aria-valuetransitiongoal="100">100%</div>
										</div>
									</td>
									<td></td>
									<td>12小时30分</td>
									<td>11小时34分</td>
									<td>2014-07-07 22:30</td>
									<td></td>
									<td>2014-07-08 10:00</td>
									<td></td>
									<td>北京站</td>
									<td></td>
									<td>上海站</td>
								</tr>
								<tr>
									
									<td><a href="#" class="jindu">北京市-石家庄-深圳</a></td>
									<td>冀FF4773 </td>
									<td> </td>
									<td><span class="label bg-color-magenta font-sm">已结束</span></td>
									<td><div class="txt-color-red"><i class="fa fa-fw fa-warning"></i> 晚到</div></td>
								
									<td>
										<div class="progress progress-sm no-margin pull-width120">
											<div class="progress-bar bg-color-green" style="line-height:12px" aria-valuetransitiongoal="100">100%</div>
										</div>
									</td>
									<td></td>
									<td>12小时30分</td>
									<td><span class="label bg-color-red font-sm">13小时11分</span></td>
									<td>2014-07-07 22:30</td>
									<td></td>
									<td>2014-07-08 10:00</td>
									<td></td>
									<td>北京站</td>
									<td></td>
									<td>上海站</td>
								</tr>
							</tbody>
						</table>
					</div>
					<!-- end widget content -->
				</div>
				<!-- end widget div -->
			</div>
			<!-- end widget -->

		</article>
		<!-- WIDGET END -->
	</div>
	<!-- end row -->
</section>

<!-- Modal导出 -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
					&times;
				</button>
				<h4 class="modal-title" id="myModalLabel">导出车辆数据</h4>
			</div>
			<div class="modal-body">
				<form class="smart-form" action="">
					<fieldset class="no-padding">
						<div class="col-xs-12 no-padding">
							<div class="row margin-top-5">
								<div class="col col-10">
									<label class="label">数据包1（1-10000）</label>
									<label class="select">
										<div class="progress progress-xs progress-striped active">
											<div class="progress-bar bg-color-blue" role="progressbar" style="width: 100%"></div>
										</div>
									</label>
								</div>
								<div class="col col-2">
									<button type="button" class="btn btn-sm btn-success btn-block margin-top-10">下载</button>
								</div>
							</div>
							<hr />
							<div class="row margin-top-5">
								<div class="col col-10">
									<label class="label">数据包2（10001-20000）</label>
									<label class="select">
										<div class="progress progress-xs progress-striped active">
											<div class="progress-bar bg-color-blue" role="progressbar" style="width: 45%"></div>
										</div>
									</label>
								</div>
								<div class="col col-2">
									<button type="button" class="btn btn-sm btn-success margin-top-10 btn-block disabled">下载</button>
								</div>
							</div>
						</div>
					</fieldset>
				</form>

			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-primary">
					打包下载
				</button>
				<button type="button" class="btn btn-default" data-dismiss="modal">
					取消
				</button>
			</div>
		</div>
	</div>
</div><!-- /.modal -->
<!-- Modal LBS跟踪 -->
<div class="modal fade" id="viewLbs" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
					&times;
				</button>
				<h4 class="modal-title" id="myModalLabel">跟踪回放</h4>
			</div>
			<div class="modal-body no-padding" style="position:relative;height:500px;">
				<div id="mapView" style="width:100%;height:100%;background:#ccc;"></div>
				<div style="position:absolute; top:5px; right:5px;">
					<form role="search" class="navbar-form no-margin pull-left pull-width240">
						<div class="input-group">
							<input type="text" id="viewDate" value="2014-02-01" class="form-control">
							<script type="text/javascript">	
									$(document).ready(function() {
									  $('#viewDate').daterangepicker({ 
											singleDatePicker: true, //必须要有默input 认value
											//timePicker: true,		//是否启用时间选择
											timePickerIncrement:10,	//分钟选择的间隔
											format: 'YYYY-MM-DD',	//返回值的格式
											//timePicker12Hour: false,	//采用24小时计时制
											showDropdowns: true,		//是否显示年、月下拉框
											});
								   });
								</script>
							<div class="input-group-btn">
								<button type="button" class="btn btn-sm btn-default btn-primary"> 回放 </button>
							</div>
						</div>
					</form>
					<!-- <div class="btn-group">
						<a href="#" class="btn btn-default btn-sm active"> <span class="glyphicon glyphicon-move"></span></a>
						<a href="#" class="btn btn-default btn-sm"> <span class="glyphicon glyphicon-globe"></span></a>
						<a href="#" class="btn btn-default btn-sm"> <span class="glyphicon glyphicon-road"></span></span></a>
						<a href="#" class="btn btn-default btn-sm"> <span class="glyphicon glyphicon-check"></span></a>
					</div> -->
					<div class="btn-group">
						<a href="#" class="btn btn-default btn-sm"> 路况 </a>
						<a href="#" class="btn btn-default btn-sm"> 卫星 </a>
					</div>

				</div>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal-dialog -->
</div><!-- /.modal -->

<!-- end widget grid -->
<!-- MAIN APP JS FILE -->

<script src="http://ditu.google.cn/maps?file=api&amp;v=2&amp;sensor=false" type="text/javascript"></script> 

<script src="js/plugin/date/moment.js"></script>
<script src="js/plugin/date/daterangepicker.js"></script>
<script src="js/plugin/poshytip/jquery.poshytip.min.js"></script>

<script type="text/javascript">

	// DO NOT REMOVE : GLOBAL FUNCTIONS!
	pageSetUp();
	var jHtml = '<div style="width:400px;">'
+'	<div class="smart-timeline-content  padding-5 clearfix">'
+'		<h6 class="col-xs-6 no-margin">计划</h5>'
+'		<h6 class="col-xs-6 no-margin">实际</h5>'
+'	</div>'
+'	<div class="classLine smart-timeline">'
+'		<ul class="smart-timeline-list">'
+'			<li class="special">'
+'				<div class="smart-timeline-list-green"></div>'
+'				<div class="smart-timeline-icon"><div class="timeline-icon-green"></div></div>'
+'				<div class="smart-timeline-arrow"></div>'
+'				<div class="smart-timeline-time banxian_city padding-5">北京分拨</div>'
+'				<div class="smart-timeline-content clearfix">'
+'					<div class="col-xs-6 padding-5 border-right-timeline"><i class="fa fa-arrow-circle-o-down"></i> 10:00</div>'
+'					<div class="col-xs-6 padding-5 text-success"><i class="fa fa-arrow-circle-o-down"></i> 10:20</div>'
+'				</div>'
+'			</li>'
+'			<li>'
+'				<div class="smart-timeline-list-green"></div>'
+'				<div class="smart-timeline-content clearfix no-border">'
+'					<div class="col-xs-6 padding-5"><i class="fa fa-clock-o"></i> 3小时</div>'
+'					<div class="col-xs-6 padding-5 text-danger"><i class="fa fa-clock-o"></i> 3小时12分</div>'
+'				</div>'
+'				<div class="smart-timeline-icon">'
+'					<div class="timeline-icon-green"></div>'
+'				</div>'
+'				<div class="smart-timeline-arrow"></div>'
+'				<div class="smart-timeline-time banxian_city padding-5">石家庄</div>'
+'				<div class="smart-timeline-content clearfix">'
+'					<div class="col-xs-6 padding-5 border-right-timeline">'
+'						<p><i class="fa fa-angle-double-down"></i>  14-05-18 01:00</p>'
+'						<p><i class="fa fa-dot-circle-o"></i> 30分钟 </p>'
+'						<p><i class="fa fa-angle-double-down"></i>  14-05-18 01:30</p>'
+'					</div>'
+'					<div class="col-xs-6 padding-5">'
+'						<p class="text-success"><i class="fa fa-angle-double-down"></i> 14-05-18 00:55</p>'
+'						<p class="text-success"><i class="fa fa-dot-circle-o"></i> 30分钟 </p>'
+'						<p class="text-success"><i class="fa fa-angle-double-down"></i>  14-05-18 01:25</p>'
+'					</div>'
+'				</div>'
+'			</li>'

+'			<li class="special s2">'
+'				<div class="smart-timeline-content clearfix no-border">'
+'					<div class="col-xs-6 padding-5"><i class="fa fa-clock-o"></i> 1小时</div>'
+'					<div class="col-xs-6 padding-5 txt-color-red"></div>'
+'				</div>'
+'				<div class="smart-timeline-icon"></div>'
+'				<div class="smart-timeline-arrow"></div>'
+'				<div class="smart-timeline-time banxian_city padding-5">深圳分拨</div>'
+'				<div class="smart-timeline-content clearfix">'
+'					<div class="col-xs-6 padding-5 border-right-timeline"><i class="fa fa-arrow-circle-o-down"></i>  14-05-18 10:00</div>'
+'					<div class="col-xs-6 padding-5"><i class="fa fa-arrow-circle-o-down"></i> --</div>		'
+'				</div>'
+'			</li>'
+'		</ul>'
+'	</div>'
+'</div>';

	$(function(){
		$("#e5").select2({  //自动完成
		    placeholder: "aaaaa",
			allowClear: true,
		    minimumInputLength: 1,
		    data:[{id:0,text:'enhancement'},{id:1,text:'bug'},{id:2,text:'duplicate'},{id:3,text:'invalid'},{id:4,text:'wontfix'}]
		});
		$('.jindu').poshytip({  //查看发车计划进行详情
			className: 'tip-white',
			showTimeout: 1,
			alignTo: 'target',
			alignX: 'right',
			alignY: 'center',
			offsetX: 25,
			offsetY: 8,
			//allowTipHover: false,
			fade: false,
			slide: false,
			content: function(updateCallback) {
				window.setTimeout(function() {
					updateCallback(jHtml);
				}, 1000);
				return 'Loading...';
			}
			
		});
	})

	// 更多搜索条件按钮!
	$("#more_search").attr("state","close");			
	$("#more_search").click(function(){
		if ($("#more_search").attr("state") == "close"){
			$(".widget-body-toolbar").css("height","auto");	
			$("#more_search").text("收起条件");
			$("#more_search").attr("state","open");
		}
		else {
			$(".widget-body-toolbar").css("height","70");	
			$("#more_search").text("更多条件");
			$("#more_search").attr("state","close");			
			}
	});

	// load bootstrap-progress bar script
	loadScript("js/plugin/bootstrap-progressbar/bootstrap-progressbar.js", progressBarAnimate);

	// Fill all progress bars with animation
	function progressBarAnimate() {
		$('.progress-bar').progressbar({
			display_text : 'fill'
		});
	}

	// PAGE RELATED SCRIPTS

	loadDataTableScripts();
	function loadDataTableScripts() {

		loadScript("js/plugin/datatables/jquery.dataTables-cust.min.js", dt_2);

		function dt_2() {
			loadScript("js/plugin/datatables/ColReorder.min.js", dt_3);
		}

		function dt_3() {
			loadScript("js/plugin/datatables/FixedColumns.min.js", dt_4);
		}

		function dt_4() {
			loadScript("js/plugin/datatables/ColVis.min.js", dt_5);
		}

		function dt_5() {
			loadScript("js/plugin/datatables/ZeroClipboard.js", dt_6);
		}

		function dt_6() {
			loadScript("js/plugin/datatables/media/js/TableTools.min.js", dt_7);
		}

		function dt_7() {
			loadScript("js/plugin/datatables/DT_bootstrap.js", runDataTables);
		}

	}

	function runDataTables() {

		/*
		 * BASIC
		 */
		$('#dt_basic').dataTable({
			//"sDom" : "<'dt-top-row'><'dt-wrapper't><'dt-row dt-bottom-row'<'row'<'col-sm-4'i><'col-sm-8 text-right'p>>",
			//"sDom" : '<"dt-row dt-bottom-row"flipt>',
			"sPaginationType" : "bootstrap_full",
			"bFilter": false,
			"bAutoWidth": false,
			"aaSorting": [[ 9, "desc" ]],	//默认排序列
			"aoColumns": [
				null,
				null,
				null,
				null,
				null,
				null,
				null,
				null,
				null,
				null,
				null,
				null,
				null,
				null,
				null,
				null
			], 
			//"sScrollX": "110%",
        	//"bScrollCollapse": true,
			//"bPaginate": false, //取消翻页显示
			//"bInfo": false,//页脚信息
			//"bScrollAutoCss": true,
			// "sScrollY": "300px",
			// "bScrollInfinite": true,
			//"bScrollCollapse": true,
			// "iScrollLoadGap": 30,
			//"bPaginate": false,
			//"bRetrieve": true,
			// "iDisplayLength": 5, //每页显示数据量
			//"bLengthChange": false, // 用户不可改变每页显示数量
			"bProcessing": true, // 是否启用进度显示，进度条等等，对处理大量数据很有用处。// 默认值：false
			//"bStateSave": true, // 保存状态到cookie
			"oLanguage": {
			"sZeroRecords": "抱歉， 没有找到",
			"sInfo": "从 _START_ 到 _END_ /共 _TOTAL_ 条数据",
			"sInfoEmpty": "没有数据",
			"sInfoFiltered": "(从 _MAX_ 条数据中检索)",
			"oPaginate": {
			"sFirst": "首页",
			"sPrevious": "前一页",
			"sNext": "后一页",
			"sLast": "尾页"
			},
			"sZeroRecords": "没有检索到数据",
			"sProcessing": "<img src='./loading.gif' />"
			},
 			"fnDrawCallback": function( oSettings ) {
     			$(oSettings.nTable).css('width','100%');
     			$(oSettings.nTable).find("th,td").css('white-space', 'nowrap');
     			 $(oSettings.nTable).find("tr:last td").css({ "border": '1px solid #DDDDDD'});                 
     			$(oSettings.nTable).find('tbody tr.even').css('backgroundColor', '#FFF');
     			$(oSettings.nTable).find(".btn-group").slice(-5).addClass('dropup');
                $(oSettings.nTable).find(".btn-group").slice(0,3).removeClass('dropup');
                $(oSettings.nTable).parent(".dt-wrapper").css({
                    'overflow': 'auto',
                    'min-height': '300px',
                    'background': '#f9f9f9'
                });
                //$(oSettings.nTable).find("th label input,td label input").next("span").css('margin-right', '0');
                // L = $(oSettings.nTable).find("tr").length;
                // if(L < 6){
                //     $(oSettings.nTable).find("tr:last td").css({
                //         "border": '1px solid #DDDDDD'
                //     });                 
                // };
                var chk = $(oSettings.nTable).find(".checkAll");
                chk.click(function(event) {
                    if ($(this).prop('checked')) {
                        $(this).parents("table").find('tbody td input.checkbox').prop('checked', true)
                        $(this).siblings("span").removeClass('someone');
                    } else {
                        $(this).parents("table").find('tbody td input.checkbox').prop('checked', false)
                    };
                });
                $(oSettings.nTable).find("td input.checkbox").click(function(event) {
                    if (!$(this).prop('checked')) {
                        chk.siblings("span").addClass('someone');
                    };
                    checkStateAll = true;
                    checkStateOne = false;
                    $("tbody td input.checkbox").each(function(index, el) {
                        checkStateAll = checkStateAll && $(this).prop('checked');
                        checkStateOne = checkStateOne || $(this).prop('checked');
                    });
                    if (checkStateAll) {
                        checkStateOne = false;                      
                        chk.prop('checked', true)
                        chk.siblings("span").removeClass('someone');                     
                    }
                    if (checkStateOne) {
                        chk.prop('checked', true)
                        chk.siblings("span").addClass('someone');
                    }                   
                    if (checkStateAll === checkStateOne) {
                        chk.prop('checked', false)
                        chk.siblings("span").removeClass('someone');                         
                    }
                });
 			}


		});

		/* END BASIC */

	}

	function dateExport(){
		$('#myModal').modal();
	}

	function viewDiv(){
		$('#viewLbs').modal();
		$("#viewLbs .modal-dialog").css("width","800px");
		
	}
	


</script>
